import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import echarts from './views/charts/echarts.vue'

import Department from '@/views/system/Department'
import UserManager from '@/views/system/UserManager'
import RoleManager from '@/views/system/RoleManager'
import CascadeDemo from '@/views/system/CascadeDemo'
import ShopManager from '@/views/org/ShopManager'
import ShopReg from "@/views/org/ShopReg";
import Product from "@/views/product/Product";
import QuillDemo from "@/views/product/QuillDemo";
import DoneSearch from "@/views/pet/DoneSearch";
import Pet from "@/views/pet/Pet";
import PetType from "@/views/pet/PetType";
import TodoSearch from "@/views/pet/TodoSearch";
import PetOrder from "@/views/order/PetOrder";
import ProductOrder from "@/views/order/ProductOrder";

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: ShopReg,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/usermanager', component: UserManager, name: '用户管理' },
            { path: '/form', component: Form, name: '菜单管理' },
            { path: '/rolemanager', component: RoleManager, name: '角色管理' },
            { path: '/permmanager', component: user, name: '权限管理' },
            { path: '/cascaderdemo', component: CascadeDemo, name: '级联选择器用法' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [
            { path: '/shopmanager', component: ShopManager, name: '店铺管理' }
        ]
    },{
        path: '/',
        component: Home,
        name: '产品管理',
        iconCls: 'fa fa-address-card',
        // leaf: true,//只有一个节点
        children: [
            { path: '/product', component: Product, name: '服务管理' },
            { path: '/quilldemo', component: QuillDemo, name: '富文本编辑器示例' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '宠物管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/pettype', component: PetType, name: '宠物分类管理' },
            { path: '/todosearch', component: TodoSearch, name: '待处理寻主信息' },
            { path: '/donesearch', component: DoneSearch, name: '已处理寻主信息' },
            { path: '/pet', component: Pet, name: '宠物维护' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/productorder', component: ProductOrder, name: '服务订单' },
            { path: '/petorder', component: PetOrder, name: '领养订单' },
            { path: '/form', component: Form, name: '商品订单' },
            { path: '/form', component: Form, name: '收购订单' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;
